﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SanctusSoftware.Music.Lyrics
{
    public class StringDictionary : Dictionary<string, string>
    {

        public string GetDelimitedList()
        {
            return GetDelimitedList(" - ", "; ");
        }

        public string GetDelimitedList(string keyValueDelimiter, string itemDelimiter)
        {

            StringBuilder sb = new StringBuilder();

            foreach (string key in this.Keys)
            {

                if (sb.Length > 0)
                {
                    sb.Append(itemDelimiter);
                }
                sb.Append(key + keyValueDelimiter + this[key]);
            }

            return sb.ToString();

        }

    }
}
